<template>
  <div class="form-public-setting">
    <el-checkbox :value="field.isPublic" @input="update" :true-label="1" :false-label="0">
      {{$t('common.form.setting.setPublicField')}}
      <el-tooltip placement="top">
        <div slot="content">
          {{$t('common.form.tip.formPublicSetting.tips1')}}<br />{{$t('common.form.tip.formPublicSetting.tips2')}}
        </div>
        <i class="iconfont icon-question"></i>
      </el-tooltip>
    </el-checkbox>
  </div>
</template>

<script>
/* props */
import { settingProps } from '@src/component/form/components/props';

export default {
  name: 'form-public-setting',
  props: {
    ...settingProps
  },
  methods: {
    update(value) {
      this.$emit('input', value, 'isPublic');
    }
  }
}
</script>